package com.tao.poly_;

import jdk.nashorn.internal.ir.CallNode;

public class poly01 {
    public static void main(String[] args) {
        Master tom = new Master("Tom");
        Dog dog = new Dog("大黄-");
        Bone bone = new Bone("大棒骨-");
        tom.feed(dog,bone);

        Master jack = new Master("Jack");
        Cat cat = new Cat("Jenny-");
        Fish fish = new Fish("黄花鱼-");
        tom.feed(cat,fish);

        Pig pig = new Pig("小花猪-");
        Food rice = new Rice("米饭-");
        tom.feed(pig,rice);
    }
}
